#ifndef SNIFFER_H
#define SNIFFER_H

#include <QThread>
#include"pcap.h"

class Sniffer:public QThread
{
    Q_OBJECT
private:
    pcap_t *adhandle;
    bool pause;
protected:
    void run() override;
public:
    Sniffer();
    void set_adhandle(pcap_t *adhandle);
    pcap_t* get_adhandle();
    void start_sniffer();
    void pause_sniffer();

signals:
    void packge_signal(const unsigned char* content,struct pcap_pkthdr * header);
};


#endif // SNIFFER_H
